package com.magicborrow.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.magicborrow.R;

/**
 * Created by Administrator on 2016/5/15.
 */
public class AboutActivity extends BaseActivity implements View.OnClickListener{

    private RelativeLayout version_update;
    private RelativeLayout cooperation;
    private RelativeLayout join_my;
    private RelativeLayout raiders;
    private RelativeLayout user_agreement;
    private RelativeLayout direct_feedback;
    private TextView emil_feedback;
    private TextView qq_feedback;
    private TextView version_code;
    private TextView new_version;
    private ImageView iv_back;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about);
        initView();
        initListener();
    }

    private void initView(){
        version_update = (RelativeLayout)findViewById(R.id.version_update);
        cooperation = (RelativeLayout)findViewById(R.id.cooperation);
        join_my = (RelativeLayout)findViewById(R.id.join_my);
        raiders = (RelativeLayout)findViewById(R.id.raiders);
        user_agreement = (RelativeLayout)findViewById(R.id.user_agreement);

        emil_feedback = (TextView)findViewById(R.id.emil_feedback);
        qq_feedback = (TextView)findViewById(R.id.qq_feedback);
        version_code= (TextView)findViewById(R.id.version_code);
        new_version = (TextView)findViewById(R.id.new_version);

        iv_back = (ImageView)findViewById(R.id.iv_back);
        iv_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        //
    }

    private void initListener(){
        cooperation.setOnClickListener(this);
        join_my.setOnClickListener(this);
        raiders.setOnClickListener(this);
        user_agreement.setOnClickListener(this);
    }

    @Override
    public void onClick(View v){
        Intent intent = new Intent();
        switch (v.getId()){
            case R.id.version_update:
                break;
            case R.id.cooperation:
                intent.setClass(this,BusinessActivity.class);
                break;
            case R.id.join_my:
                intent.setClass(this,JoinUsActivity.class);
                break;
            case R.id.raiders:
                intent.setClass(this,MojieGongluActivity.class);
                break;
            case R.id.user_agreement:
                intent.setClass(this,AgreementActivity.class);
                break;
//            case R.id.direct_feedback:
//                break;
//            case R.id.iv_back:
//                finish();
//                break;
        }
        startActivity(intent);

    }

}
